﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

public partial class Users_TicketDetail : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            try
            {
                TicketBAL _ticketBAL = new TicketBAL();
                string userid = Membership.GetUser().ProviderUserKey.ToString();
                int ticketID = Convert.ToInt32(Request.QueryString["id"]);
                if (!_ticketBAL.checkTicket(userid, ticketID, ""))
                {
                    Response.Redirect("~/Users/TicketList.aspx");
                }
            }
            catch (Exception)
            {
                Response.Redirect("~/Users/TicketList.aspx");
            } 
        }
    }
}
